{template 'common/header'}
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1">

        <div class="panel panel-default">
            <div class="panel-heading">
                公众号配置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">
                        运行环境
                    </label>
                    <div class="col-sm-8 col-xs-12">
                        <input id="istop-1" type="radio" name="isproduction" value="1" {if $settings['isproduction'] == '1'} checked {/if}class="ng-pristine ng-untouched ng-valid ng-not-empty">
                        <label for="istop-1">生产</label>
                        <input id="istop-2" type="radio" name="isproduction" value="0"  {if $settings['isproduction'] == '0' || empty($settings['isproduction'])} checked {/if} class="ng-pristine ng-untouched ng-valid ng-not-empty">
                        <label for="istop-2">测试</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">线路轮播图</label>
                    <div class="col-sm-9 col-xs-12">
                        {php echo tpl_form_field_multi_image('line_thumbs', $settings['line_thumbs'])}
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                客服配置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服昵称</label>
                    <div class="col-sm-9 col-xs-12">
                        <input name="service_name" class="form-control" value="{$settings['service_name']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服电话</label>
                    <div class="col-sm-9 col-xs-12">
                        <input name="service_mobile" class="form-control" value="{$settings['service_mobile']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服头像</label>
                    <div class="col-sm-9 col-xs-12">
                        {php echo tpl_form_field_image('service_avatar',$settings['service_avatar'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服二维码</label>
                    <div class="col-sm-9 col-xs-12">
                        {php echo tpl_form_field_image('qr_code_img',$settings['qr_code_img'])}
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                系统配置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">
                        关于我们
                    </label>
                    <div class="col-sm-8 col-xs-12">
                        {php echo tpl_ueditor('aboutus',$settings['aboutus'])}
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                短信宝设置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">账号</label>
                    <div class="col-sm-9 col-xs-12">
                        <input name="duanxinbao_uid" class="form-control" value="{$settings['duanxinbao_uid']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">密码</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="password" name="duanxinbao_pwd" class="form-control"
                               value="{$settings['duanxinbao_pwd']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">内容</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="duanxinbao_content" class="form-control"
                               value="{$settings['duanxinbao_content']}"/>
                        <span>如：【知行】您的验证码为{##$verify_code##}，于{##$send_time##}提交，1分钟内有效</span>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                分享设置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
                    <div class="col-sm-9 col-xs-12">
                        <input name="share_title" class="form-control" value="{$settings['share_title']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享描述</label>
                    <div class="col-sm-9 col-xs-12">
                        <textarea name="share_description" class="form-control"
                                  cols="70">{$settings['share_description']}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
                    <div class="col-sm-9 col-xs-12">
                        {php echo tpl_form_field_image('share_img',$settings['share_img'])}
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group col-sm-12">
            <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1"/>
            <input type="hidden" name="token" value="{$_W['token']}"/>
        </div>
    </form>
</div>
<script language='javascript'>
    require(['jquery', 'util'], function ($, u) {
        $(function () {
            u.editor($('.richtext')[0]);
        });
    });
</script>
{template 'common/footer'}